package vip.bblog.cunadmin.modules.system.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 系统-客户
 * </p>
 *
 * @author yy
 * @since
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_customer")
@ApiModel(value="客户", description="客户")
public class Customer implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "主键，内部id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "姓名")
    @Excel(name = "姓名")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "身份证号")
    @Excel(name = "身份证号")
    private String idcard;

    @ApiModelProperty(value = "联系电话")
    @Excel(name = "联系电话")
    private String phone;

    @ApiModelProperty(value = "性别")
    @Excel(name = "性别")
    private String sex;

    @ApiModelProperty(value = "年龄")
    @Excel(name = "年龄")
    private Integer age;

    @ApiModelProperty(value = "生日")
    @Excel(name = "生日")
    private String birthday;


    @ApiModelProperty(value = "有无癌症史")
    @Excel(name = "有无癌症史")
    @TableField("is_cancer")
    private String isCancer;

    @ApiModelProperty(value = "激活卡号")
    @Excel(name = "激活卡号")
    @TableField("card_num")
    private String cardNum;

    @ApiModelProperty(value = "卡号密码")
    @Excel(name = "卡号密码")
    @TableField("card_pwd")
    private String cardPwd;

    @ApiModelProperty(value = "激活时间")
    @Excel(name = "激活时间")
    @TableField("activation_time")
    private Date activationTime;

    @ApiModelProperty(value = "生效时间")
    @Excel(name = "生效时间")
    @TableField("start_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startTime;

    @ApiModelProperty(value = "有效时间")
    @Excel(name = "有效时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField("end_time")
    private Date endTime;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private String createTime;

    @ApiModelProperty(value = "备注")
    @Excel(name = "备注")
    @TableField("remake")
    private String remake;

    @TableField(exist = false)
    private Integer cardId;
}
